﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace USREOUCheck.Classes
{
    class JuridicalPerson : IComparable<JuridicalPerson>
    {
        //public string DrfoNumber { get; set; }
        public string EdrpouCode { get; set; }
        public bool Founded { get; set; }
        //public string Name { get; set; }
        //public string CertificateNumber { get; set; }
        //public DateTime RegistrationDate { get; set; }
        //public DateTime CommOfCertificate { get; set; }
        private string fullInfo;

        public string FullInfo 
        {
            get { return fullInfo; }

            set
            {
                fullInfo = value.Replace("&#034;", " ").Replace("&nbsp;", "");
            }
        }

        public JuridicalPerson(string edrpouCode, bool isFound)
        {
            EdrpouCode = edrpouCode;
            Founded = false;
            FullInfo = string.Empty;
        }

        public override string ToString()
        {
            return String.Format("{0}{1}", EdrpouCode, FullInfo);
        }

        public int CompareTo(JuridicalPerson other)
        {
            return String.Compare(this.EdrpouCode, other.EdrpouCode);
        }
    }
}
